A r t i c l e s
Navigation

Note: This site is
a bit older, personal views
may have changed.

M a i n P a g e

D i r e c t o r y

Paramstr vs Ruby ARGV


Modern pascal uses paramstr(1) paramstr(2) etc. to grab command line arguments.

In ruby, ARGV has similar functionality.

  def dumpargs
    ARGV.each do |arg|
      puts arg
    end
  end

  dumpargs
Or access this way
  puts ARGV[0]
  puts ARGV[1]
  puts ARGV[2] 
  # etc.

No complaints really. Pretty much the same as ParamStr() with slightly different syntax.

About
This site is about programming and other things.
_ _ _